package com.quoc.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {
	public Button btnAddOffice;
	public Button btnAddEmployee;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.layout_main);
		btnAddOffice = (Button) findViewById(R.id.btn_addoffice);
		btnAddOffice.setOnClickListener(this);
		btnAddEmployee = (Button) findViewById(R.id.btn_addemployee);
		btnAddEmployee.setOnClickListener(this);
	}

	public void onClick(View v) {
		Intent intent;
		switch (v.getId()) {
		case R.id.btn_addoffice:
			intent = new Intent(this, AddOffice.class);
			startActivity(intent);
			break;
		case R.id.btn_addemployee:
			intent= new Intent(this, AddEmployees.class);
			startActivity(intent);
		default:
			break;
		}
	}

}
